﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZX.OA.Model;
using ZX.OA.DAL;

namespace ZX.OA.BLL
{
    public class LeaveBll
    {
        /// <summary>
        /// 调用请假的DAL
        /// </summary>
        LeaveDal dal = new LeaveDal();

        /// <summary>
        /// 请假列表的显示
        /// </summary>
        /// <returns></returns>
        public List<LeaveInfo> Show_LeaveInfo()
        {
            return dal.Show_LeaveInfo();
        }
        /// <summary>
        /// 部门下拉框显示
        /// </summary>
        /// <returns></returns>
        public List<DeptInfo> Drop_DeptInfo()
        {
            return dal.Drop_DeptInfo();
        }
        /// <summary>
        /// 添加请假信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Add_LeaveInfo(LeaveInfo leave)
        {

            return dal.Add_LeaveInfo(leave);
        }
        /// <summary>
        /// 显示详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public LeaveInfo Upd_LeaveInfo(int id)
        {
            return dal.Upd_LeaveInfo(id);
        }
        /// <summary>
        /// 撤销请假信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Del_LeaveInfo(int id)
        {

            return dal.Del_LeaveInfo(id);

        }
        /// <summary>
        /// 查询请假信息
        /// </summary>
        /// <param name="EvectionPerson"></param>
        /// <param name="DeptId"></param>
        /// <returns></returns>
        public List<LeaveInfo> Sel_EvectionInfo(string LeavePerson, int? DeptId)
        {
            return dal.Sel_EvectionInfo(LeavePerson, DeptId);
        }
    }
}
